﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SGroupSetting extends IMessageBase
    {
        public var groupId:SEntityId;
        public var name:String;
        public var memberInvite:Boolean;
        public var autoEnter:Boolean;
        public var combatLimit:int;
        public var password:String;
        public const _type:int = 4003;
        public static var _regist:SGroupSetting = new SGroupSetting(true);

        public function SGroupSetting(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SGroupSetting();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.groupId.__write(param1);
            param1.writeString(this.name);
            param1.writeBool(this.memberInvite);
            param1.writeBool(this.autoEnter);
            param1.writeInt(this.combatLimit);
            param1.writeString(this.password);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.groupId = new SEntityId();
            this.groupId.__read(param1);
            this.name = param1.readString();
            this.memberInvite = param1.readBool();
            this.autoEnter = param1.readBool();
            this.combatLimit = param1.readInt();
            this.password = param1.readString();
            return;
        }// end function

    }
}
